#include <board.h>
#include <rtthread.h>
#include "gpio_led.h"

void rt_led_thread_entry(void *parameter)
{
    while (1)
    {
        // LED_RED();
        // rt_thread_delay(300/RT_SLEEP_RATIO);
        // LED_BLUE();
        // rt_thread_delay(300/RT_SLEEP_RATIO);
        // LED_GREEN();
        rt_thread_delay(300 / RT_SLEEP_RATIO);
    }
}

int rt_led_thread_init(voi)
{
    rt_thread_t tid;

    tid = rt_thread_create("led",
                           rt_led_thread_entry, RT_NULL,
                           2048, RT_THREAD_PRIORITY_MAX / 3, 20);
    if (tid != RT_NULL) rt_thread_startup(tid);
}

INIT_APP_EXPORT(rt_led_thread_init);
